package com.tianji.aigc.Controller;

import com.tianji.aigc.Service.IChatSessionService;

import com.tianji.aigc.domain.VO.SessionVO;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/session")
public class ChatSessionController {

    @Autowired
    private IChatSessionService chatSessionService;


    @PostMapping
    public SessionVO createSession(@RequestParam(value = "n",defaultValue = "3") Integer n) {

         return  chatSessionService.createSession(n);
    }
    @GetMapping("/hot")
    public List<SessionVO.Example> getHotSession(Integer n) {

        return chatSessionService.getHotSession(n);
    }

}
